<form method="post" action="__ACTION__" data-validate="true" data-continue="true"
data-submit="ajax" class="form-horizontal modal modal-small hide fade" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3>添加用户</h3>
  </div>
  <div class="modal-body">
		<div class="control-group">
			<label class="control-label must">姓名</label>
			<div class="controls">
				<input type="text" name="data[nick]"
					placeholder="最多8个字符" maxlength="8" class="required">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label must">店铺</label>
			<div class="controls">
				<select name="data[shop_id]" data-search="true">
					<foreach name="shop" item="vo">
						<option value="{$vo.id}" <if condition="$vo['id'] eq $my_shop">selected='selected'</if>>{$vo.name}</option>
					</foreach>
				</select>
			</div>
		</div>
		<!-- 
		<div class="control-group">
			<label class="control-label">用户类型</label>
			<div class="controls">
				<select name="data[type]" data-search="true">
					<foreach name="user_type_list" item="value" key="key">
					<option value="{$key}">{$value}</option>
					</foreach>
				</select>
				<i class="icon-question-sign"></i>
			</div>
		</div>
		 -->
		<div class="control-group">
			<label class="control-label must">登陆账号</label>
			<div class="controls">
				<input type="text" name="data[username]"
					placeholder="最多16个字符" maxlength="16" class="required">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label must">登陆密码</label>
			<div class="controls">
				<input id="password" type="text" name="data[password]" placeholder="最多32个字符"
					maxlength="32" class="required">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label must">确认密码</label>
			<div class="controls">
				<input type="text" name="password2" placeholder="最多32个字符" maxlength="32" class="required equalto" data-equal-to="#password" data-msg-equalto="密码不一致">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态</label>
			<div class="controls">
				<select name="data[status]">
					<option value="1">启用</option>
					<option value="0">禁用</option>
				</select>
			</div>
		</div>
		<div class="control-group">
		    <label class="control-label">关联店铺</label>
			<div class="controls">
				<foreach name="shop" item="item">
			    <label class="checkbox inline" style="width:145px;margin-left:-3px;">
			    <input name="sid[]" type="checkbox" value="{$item.id}" />{$item.name}
			    </label>
			    </foreach>
			</div>
		</div>
	</div>
  <div class="modal-footer">
  	<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  	<button type="submit" class="btn btn-primary" aria-hidden="true">保存</button>
  </div>
</form>